<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://www.etcore.com/grouptalk" prefix="grouptalk"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="platformId" value="1" />
<c:set var="platformName" value="${context.platform1}" />
<c:set var="directoriesId" value="directories1" />
<c:set var="rootGroupsId" value="rootGroups1" />
<c:set var="rootGroupsSizeId" value="rootGroups1Size" />
<c:if test="${not empty nav && nav eq '1' }">
	<c:set var="platformId" value="11" />
	<c:set var="platformName" value="${context.nav1}" />
	<c:set var="directoriesId" value="directories11" />
	<c:set var="rootGroupsId" value="rootGroups11" />
	<c:set var="rootGroupsSizeId" value="rootGroups11Size" />
</c:if>
<head>
<title><c:out value='${currentGroup.name }' />-<c:out
	value='${context.title }' /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">

<script>

function  setTagDivBound(){
	 
	var tagDiv=document.getElementById("tagDiv"); 
	var subDivs=tagDiv.getElementsByTagName("div");
	for(var i=0;i<subDivs.length;i++){

	}
	var h=tagDiv.offsetHeight ;  
 
	if(h>250) {tagDiv.style.height='250';tagDiv.style.overflow='auto';}
 
	
}


</script>
</head>
<body bottomMargin=0 leftMargin=10 topMargin=0  
	rightMargin=10 marginheight="0">
<c:import url="/group/ui-component/divdialog/divdialog.html" />
<TABLE cellSpacing=0 cellPadding=0 border=0 width=100% align=center>

	<TR>
		<TD height=30 width=100%><c:import
			url="/banner.jsp?currentPlatform=${platformId }" /></TD>
	</TR>






	<TR>
		<td width=100%>
		<table width=100%>
			<tr>

				<TD vAlign=top width=100% align=center>

				<table width=100% cellSpacing=0 cellPadding=0>
					<tr>
						<td valign=top width=185><c:import
							url="/group/newsViewLeft.jsp" /></td>
						<td width=100% valign=top>




						<table cellpadding=2 cellspacing=2 width=100% align=left>
						 
							<tr>
							<td nowrap width=90><a
											style="height: 15px; font-size: 12px; color: #005EAC"
											href="/group/newsView<c:out value='${context.postfix }' />?gid=${currentGroup.id}"><c:if
									test="${not empty currentGroup.pic &&fn:indexOf(currentGroup.pic,'upload')!=-1 }">
									<img src="/<c:out value='${currentGroup.pic}' />" height=96
										style="border: 1px solid #b4d2d4;">
								</c:if><c:if
									test="${empty currentGroup.pic ||fn:indexOf(currentGroup.pic,'upload')==-1 }">
									<img src="/group/images/avatar/group.jpg" height=96
										style="border: 1px solid #b4d2d4;">
								</c:if></a></td>
								
								
								
								<td align=left valign=top nowrap width=450>
								<table width=100% align=left  >
									<tr>
										<td><a
											style="height: 15px; font-size: 13px; font-weight:bold;  "
											href="/group/newsView<c:out value='${context.postfix }' />?gid=${currentGroup.id}"><c:out
											value="${currentGroup.name }" /></a></td>
									 
									</tr>
									<tr>
										<td>
										<div style="height: 65px; overflow: auto;"><textarea
											readonly
											style="cursor: text; border: 2px solid #C5B1D8; font-size: 12px; color: #808080; overflow-y: visible; height: 60px;"
											cols="60" rows="3 "><c:out
											value="${currentGroup.info }"
											default="${context.default_intro }" /></textarea></div>
										</td>
									</tr>



								</table>
								</td>
								
								
								
								
								
								
								
								<td width=100% align=right valign=top>
								<form name=f
									action="/group/newsView<c:out value='${context.postfix}' />"
									method=post><c:if test="${not empty param.tid }">
									<input type=hidden name=tid
										value="<c:out value='${param.tid }' />" size=1 />
								</c:if> <input type=hidden name=gid
									value="<c:out value='${param.gid }' />" size=1 />
								<table>
									<tr valign=top>
										<td style="height: 42px; padding-left: 0px" nowrap><input
											type=text name=key size=25 maxlength=100
											value="<c:out value='${param.key }' />"> <input
											type=submit value="search"></td>
									</tr>
								</table>
								</form>
								</td>
							</tr>
							<tr>
								<td colspan=3 height=15><c:if
									test="${!(context.encryptedUrl1) }">
									<a
										<c:if
										test="${empty param.tid }">
										style="color:red;font-weight:bold;"
									</c:if>
										href="/group/newsView<c:out value='${context.postfix}' />?gid=<c:out value='${param.gid }' />"><c:out
										value='${context.text_whole }' /></a>&nbsp;
</c:if> <c:if test="${(context.encryptedUrl1) }">
									<c:set var='urlFragmentStr' value="?gid=${param.gid }" />
									<c:set var='urlFragment'
										value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
									<a
										<c:if
										test="${empty param.tid }">
										style="color:red; font-weight:bold;" 
									</c:if>
										href="/group/newsView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"><c:out
										value='${context.text_whole }' /></a>&nbsp;
</c:if> <c:forEach var="topic" items="${topics }">
									<c:if test="${!(context.encryptedUrl1) }">
										<a
											<c:if
											test="${topic.id==param.tid }">
											style="color:red; font-weight:bold;"
										</c:if>
											href="/group/newsView<c:out value='${context.postfix}' />?gid=<c:out value='${param.gid }' />&tid=<c:out value='${topic.id }' />"><c:out
											value='${topic.name }' /></a>&nbsp;
</c:if>
									<c:if test="${(context.encryptedUrl1) }">
										<c:set var='urlFragmentStr'
											value="?gid=${param.gid }&tid=${topic.id }" />
										<c:set var='urlFragment'
											value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
										<a
											<c:if
											test="${topic.id==param.tid }">
											style="font-weight:bold; color:red;" 
										</c:if>
											href="/group/newsView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"><c:out
											value='${topic.name }' /></a>&nbsp;
</c:if>
								</c:forEach></td>
							</tr>

							<c:if test="${tagContainerCount>0 }">
								<tr>
									<td colspan=3 width=100%>
									<div id=tagDiv style="border: 1px solid #d2d4d2; width: 100%;">
									<table width=100%>
										<c:forEach var="tagContainer" items="${tagContainers}">



											<tr>

												<td nowrap>${tagContainer.name }：</td>
												<c:set var="postParams" value="" />
												<c:forEach var="tmpTagContainer" items="${tagContainers}">
													<c:set var="tmpTcidParam" value="tcid${tmpTagContainer.id}" />
													<c:if
														test="${not empty param[tmpTcidParam] && tmpTagContainer.id!=tagContainer.id}">
														<c:set var="postParams"
															value="${postParams }&${tmpTcidParam }=${param[tmpTcidParam]}" />
													</c:if>
												</c:forEach>
												<td width=100% style="word-wrap: break-word">
												<div><c:set var="tcidParam"
													value="tcid${tagContainer.id}" /><a
													<c:if test='${empty param[tcidParam]}'>style="color:red;font-weight:bold;"</c:if>
													href="/group/newsView<c:out value='${context.postfix}' />?gid=<c:out value='${param.gid }' />&tid=<c:out value='${param.tid }' />${postParams}"><c:out
													value='${context.text_whole }' /></a>&nbsp;&nbsp;<c:set
													var="tags" value="${tagContainer.id }tags" /><c:forEach
													var="tag" items="${requestScope[tags]}">
													<a
														<c:if test='${param[tcidParam]==tag.id }'>style="color:red;font-weight:bold;"</c:if>
														href="/group/newsView<c:out value='${context.postfix}' />?gid=<c:out value='${param.gid }' />&tid=<c:out value='${param.tid }' />&tcid${tagContainer.id}=${tag.id}${postParams}"><c:out
														value='${tag.name}' /></a>&nbsp;&nbsp;</c:forEach></div>
												</td>
											</tr>

										</c:forEach>

									</table>
									</div>
									</td>
								</tr>
							</c:if>
							<tr>
								<td align=right height=15 colspan=3><font color=red><c:out
									value='${all }' /></font>&nbsp;<c:out value='${context.text_item}' />
								<c:if test="${not empty param.key}">
									&nbsp;<font color=red><c:out value='${param.key}' /></font>&nbsp;</c:if><c:out
									value='${context.text_related}' />&nbsp;</td>
							</tr>

						 
							<c:forEach var="message" items="${msgs}">
							<c:set var="currentImg" value="" />
								<c:set var="messageImages" value="${message[0]}attachments" />
								<c:forEach var="image" items="${requestScope[messageImages]}">
									<c:set var="currentImg" value="${image }" />
								</c:forEach>
								<c:if test='${ currentImg eq ""}'><c:set var="currentImg" value="/group/images/no.gif" /></c:if>
								<tr>
									<td colspan=3>
 
									<table cellpadding=1 cellspacing=1 width=100%>
										<tr>
											<td width=165 valign=top align=center><c:if
												test="${!(context.msg_encryptedUrl) }">
												<a
													href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
													target=_blank><img src="${currentImg }" width="160" height="120"
													 style="border: 1px solid #b4d2d4;"></a>

											</c:if><c:if test="${(context.msg_encryptedUrl) }">
												<c:set var='urlFragmentStr' value="?id=${message[0] }" />
												<c:set var='urlFragment'
													value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
												<a
													href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
													target=_blank><img src="${currentImg }" width="160" height="120"
													  style="border: 1px solid #b4d2d4;"></a>
											</c:if></td>
											<td align=left width=100% valign=top>
											<div id="table<c:out value='${message[0] }' />"
												style="padding: 0px; width: 100%; background-color: white; overflow: auto;">
											<table>
												<tr>
													<td valign=top><c:if
														test="${!(context.msg_encryptedUrl) }">
														<a style="font-size: 11px; cursor: pointer; color: #005EAC"
															href="/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />"
															target=_blank> <c:if test="${empty param.key }">
															<c:out value='${message[2]}' />
														</c:if> <c:if test="${not empty param.key }">
															<c:out
																value="${grouptalk:getStringWithRedKey(message[2],param.key)}"
																escapeXml="false" />
														</c:if> </a>
													</c:if> <c:if test="${(context.msg_encryptedUrl) }">
														<c:set var='urlFragmentStr' value="?id=${message[0] }" />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a style="font-size: 11px; cursor: pointer; color: #005EAC"
															href="/group/messagedetail<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"
															target=_blank> <c:if test="${empty param.key }">
															<c:out value='${message[2] }' />
														</c:if> <c:if test="${not empty param.key }">
															<c:out
																value="${grouptalk:getStringWithRedKey(message[2],param.key)}"
																escapeXml="false" />
														</c:if> </a>
													</c:if></td>
												</tr>
												<c:if test="${not empty message[8] }">
													<tr>
														<td align=left width=100%  style="font-size: 11px; color: #808080"><c:if
															test="${not empty param.key }">
															<c:out
																value="${grouptalk:getStringWithRedKey(message[8],param.key)}"
																escapeXml="false" />
														</c:if> <c:if test="${empty param.key }">
															<c:out value='${message[8] }' />
														</c:if></td>
													</tr>
												</c:if>
												<tr>
													<td align=left width=100%
														style="font-size: 11px; color: #808080"><c:if
														test="${!(context.encryptedUrl1) }">
														<c:out value='${context.msg_topic}' />：
												<a style="color: #999999"
															href="/group/newsView<c:out value='${context.postfix}' />?gid=<c:out value='${param.gid }'/>&tid=<c:out value='${message[1] }'/>"><c:out
															value='${topicMap[message[1]]}' /></a>
													</c:if><c:if test="${(context.encryptedUrl1) }">
														<c:set var='urlFragmentStr'
															value="?gid=${param.gid }&tid=${message[1] }" />
														<c:set var='urlFragment'
															value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
														<a
															href="/group/newsView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />"><c:out
															value='${topicMap[message[1]]}' /></a>
													</c:if>&nbsp;<c:out value='${context.text_publish }' />：<c:out
														value='${message[3] }' /><c:set var="lastComment"
														value='${message[0] }lastComment' />&nbsp;<c:if
														test="${not empty requestScope[lastComment] }">
														<c:out value='${context.text_last_reply }' />：<c:out
															value='${requestScope[lastComment] }' />
													</c:if></td>
												</tr>
												<tr>
													<td align=left width=100%
														style="font-size: 11px; color: #808080"><c:out
														value='${context.text_click }' />：<c:out
														value='${message[5] }' /> &nbsp;<c:out
														value='${context.text_comment }' />：<c:set
														var="commentNum" value='${message[0] }commentNum' /><c:out
														value='${requestScope[commentNum] }' /></td>
												</tr>
												<tr>
													<td align=left width=100%>
													<c:if test="${not empty session_user}">
													<input type=button style="cursor: pointer; height: 20px; font-size: 11px; color: #ffffff; background: #36518B;" value='${context.text_comment }' onclick="location='/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />&init=reply';"/>
													</c:if>
													<c:if test="${ empty session_user}">
													<input type=button style="cursor: pointer; height: 20px; font-size: 11px; color: #ffffff; background: #36518B;" value='${context.text_comment }' onclick="location='/group/messagedetail<c:out value='${context.postfix}' />?id=<c:out value='${message[0]}' />&init=login';"/>
													</c:if>
													</td>
												</tr>
											</table>
											</div>
											</td>

										</tr>

									</table>

									</td>
								</tr>



							</c:forEach>



							<tr>
								<td height=30></td>
							</tr>
							<c:set var="postParams" value="" />
							<c:forEach var="tmpTagContainer" items="${tagContainers}">
								<c:set var="tmpTcidParam" value="tcid${tmpTagContainer.id}" />
								<c:if test="${not empty  param[tmpTcidParam]}">
									<c:set var="postParams"
										value="${postParams }&${tmpTcidParam }=${param[tmpTcidParam]}" />
								</c:if>
							</c:forEach>
							<tr bgcolor="#ffffff">
								<td align=left colspan=3><c:set var="pid" value="${startpid }" /> <c:forEach
									begin="${startpid }" end="${endpid }" step="1">
									<c:if test="${!(context.encryptedUrl1) }">
										<c:set var="url"
											value="/group/newsView${context.postfix}?pageid=${pid}&gid=${param.gid}${postParams }" />
										<c:if test='${not empty (param.key) }'>
											<c:set var="url" value="${url }&key=${param.key}" />
										</c:if>
										<c:if test='${not empty (param.tid) }'>
											<c:set var="url" value="${url }&tid=${param.tid}" />
										</c:if>
										<a href="${url }"
											<c:if test='${intpageid==pid }'>
											style="color:red;font-weight:bold;"</c:if>>
										[<c:out value='${pid}' />]</a>
									</c:if>
									<c:if test="${(context.encryptedUrl1) }">
										<c:set var='urlFragmentStr'
											value="?pageid=${pid}&gid=${param.gid}${postParams }" />
										<c:if test='${not empty param.key }'>
											<c:set var="urlFragmentStr"
												value="${urlFragmentStr }&key=${param.key}" />
										</c:if>
										<c:if test='${not empty param.tid }'>
											<c:set var="urlFragmentStr"
												value="${urlFragmentStr }&tid=${param.tid}" />
										</c:if>
										<c:set var='urlFragment'
											value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
										<a
											<c:if test='${intpageid==pid }'>
											style="font-weight:bold;color:red;"
										</c:if>
											href="/group/newsView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />">
										[<c:out value='${pid}' />]</a>
									</c:if>
									<c:set var="pid" value="${pid+1 }" />
&nbsp;&nbsp;</c:forEach> <c:if test="${intpageid>1 }">
									<c:if test="${!(context.encryptedUrl1) }">
										<c:set var="url"
											value="/group/newsView${context.postfix}?pageid=${intpageid-1}&gid=${param.gid}${postParams }" />
										<c:if test='${not empty (param.key) }'>
											<c:set var="url" value="${url }&key=${param.key}" />
										</c:if>
										<c:if test='${not empty (param.tid) }'>
											<c:set var="url" value="${url }&tid=${param.tid}" />
										</c:if>
										<a href="${url }"> [<c:out
											value='${context.previous_page}' />] </a>
									</c:if>
									<c:if test="${(context.encryptedUrl1) }">
										<c:set var='urlFragmentStr'
											value="?pageid=${intpageid-1}&gid=${param.gid}${postParams }" />
										<c:if test='${not empty param.key }'>
											<c:set var="urlFragmentStr"
												value="${urlFragmentStr }&key=${param.key}" />
										</c:if>
										<c:if test='${not empty param.tid }'>
											<c:set var="urlFragmentStr"
												value="${urlFragmentStr }&tid=${param.tid}" />
										</c:if>
										<c:set var='urlFragment'
											value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
										<a
											href="/group/newsView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />">
										[<c:out value='${context.previous_page}' />] </a>
									</c:if>
&nbsp;
</c:if> <c:if test="${intpageid<pagenums }">
									<c:if test="${!(context.encryptedUrl1) }">
										<c:set var="url"
											value="/group/newsView${context.postfix}?pageid=${intpageid+1}&gid=${param.gid}${postParams }" />
										<c:if test='${not empty (param.key) }'>
											<c:set var="url" value="${url }&key=${param.key}" />
										</c:if>
										<c:if test='${not empty (param.tid) }'>
											<c:set var="url" value="${url }&tid=${param.tid}" />
										</c:if>
										<a href="${url }"> [<c:out value='${context.next_page}' />]
										</a>
									</c:if>
									<c:if test="${(context.encryptedUrl1) }">
										<c:set var='urlFragmentStr'
											value="?pageid=${intpageid+1}&gid=${param.gid}${postParams }" />
										<c:if test='${not empty param.key }'>
											<c:set var="urlFragmentStr"
												value="${urlFragmentStr }&key=${param.key}" />
										</c:if>
										<c:if test='${not empty param.tid }'>
											<c:set var="urlFragmentStr"
												value="${urlFragmentStr }&tid=${param.tid}" />
										</c:if>
										<c:set var='urlFragment'
											value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
										<a
											href="/group/newsView<c:out value='${context.postfix}' />/~<c:out value='${urlFragment }' />">
										[<c:out value='${context.next_page}' />] </a>
									</c:if>
&nbsp;
</c:if></td>
							</tr>



						</table>
						</td>
					</tr>
				</table>
				</TD>
			</tr>
		</table>
		</td>
	</TR>
	<tr>
		<td><BR>
		 <BR>
		<c:import url="/footer.jsp" /></td>
	</tr>


</table>

</body>

